home *** CD-ROM | disk | FTP | other *** search
- Path: rover.ucs.ualberta.ca!gpu3!hcolquho
- From: hcolquho@gpu3.srv.ualberta.ca (Harry Colquhoun)
- Newsgroups: comp.lang.c
- Subject: malloc question
- Date: 6 Apr 1996 23:08:07 GMT
- Organization: University of Alberta, Edmonton, Canada
- Message-ID: <4k6tgn$13c8@pulp.ucs.ualberta.ca>
- NNTP-Posting-Host: gpu3.srv.ualberta.ca
- X-Newsreader: NN version 6.5.0 (NOV)
-
- Not quite sure what's happening here, most likely something real stupid I
- did, I'm sure.
-
- compiled using djgpp under MSDOS->works fine
- compiled using djgpp on SGI->core dump
-
- -------------------------
- global variable 'frames'
-
- the problem:
-
- unsigned long int *mem;
- mem = (unsigned long int *) malloc (frames);
- -------------------------
-
- changing to 'unsigned long int mem[100]' and no malloc fixes problem
-
-
- Anyone know why?
-
- Harry.
- (email me please)
-
- --
- ------------------------------------------------------------------------------
- DEEP THOUGHTS: "If trees could scream, would you still cut them down?...
- Well, you would if they screamed all the time."
- ------------------------------------------------------------------------------
-